﻿using AutoFixture;
using DataInit.DataContexts.DataGenerate;
using DataInit.DataContexts.DataSave;
using DataInit.Entities;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;

namespace DataInit
{
    class Program
    {
        static void Main(string[] args)
        {
            IServiceCollection service = new ServiceCollection();
            service.AddSagaStorage().AddDataSaver();
            var builder = service.BuildServiceProvider();

            var dataGenertor = builder.GetService<DataGenerator>();
            var dagaSaver = builder.GetService<DataSaver>();

            var loginOperators = dataGenertor.GenerateLoginOperators().Result;
             dagaSaver.Generate(loginOperators).Wait();

            var incident = dataGenertor.GenerateIncidentEntities().Result;
            dagaSaver.Generate(incident).Wait();



            //var fix = new Fixture();
            //var actions = fix.CreateMany<IncAddrEntity>(10);







            Console.WriteLine("Hello World!");
        }
    }
}
